package com.test.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

public class MyConfig extends WebMvcConfigurerAdapter{
//	@Autowired
//	private Interceptor interceptor;
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		System.out.println("什么个情况");
		registry.addInterceptor(new Interceptor()).addPathPatterns("/**");
		super.addInterceptors(registry);
	}
}
